import request from "@/api/service";
import qs from 'qs';

const api = {
  // 查询驾考题库
  driverexam:'/api',

  // 用户名 登录
  login1:'/local/login1',
  // 手机号 登录
  login2:'/local/login2',
  // 注册
  register:'/local/register',

  message:'/v1/message'
}


export function axios_driverexam(data){
  return request({
    url:api.driverexam,
    method:'get',
    params:{
      ...data
    }
  })
}

export function axios_login1(data){
  return request({
    url:api.login1,
    method:'post',
    data:qs.stringify(data)
  })
}

export function axios_login2(data){
  return request({
    url:api.login2,
    method:'post',
    data:qs.stringify(data)
  })
}

export function axios_register(data){
  return request({
    url:api.register,
    method:'post',
    data:qs.stringify(data)
  })
}

export function axios_message(data){
  return request({
    url:api.message,
    method:'get',
    params:{
      ...data
    }
  })
}